home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / bgft211.zip / BGFTUYTL.SLT < prev    next >
Text File  |  1991-05-02  |  5KB  |  104 lines

  1. // BGFTUYTL.SLT: Telix script for BGFT Ymodem Batch upload.
  2. // Support Package for Registered Users of BGFT (TM).
  3. // Copyright 1990-1991 Dirac Systems.
  4. // Telix is a trademark of Exis Inc.
  5.  
  6. // MANUAL INSTALLATION:
  7. // The following outlines how to install the script for use as an
  8. //      external protocol in Telix:
  9. // Be sure that the resident part (BGFT360K.COM or BGFT720K.COM) of
  10. //      BGFT is loaded before the communications program. Add /B if
  11. //      you want Drive B:. The BGFT status window does not need to be
  12. //      active; it need only be resident.
  13. // The batch file BGFTINIT.BAT is used to initialize BGFT prior to
  14. //      running Telix. This file must be edited to contain information
  15. //      about your modem's port number and baud rate prior to use
  16. //      (default is 1200 baud, port 1). You must run the batch file
  17. //      BGFTINIT.BAT to make sure that BGFT is set up properly. THIS
  18. //      MUST BE DONE before using BGFT as an external protocol under
  19. //      Telix. This is true even though the baud and port are set here.
  20. // Put the right sized floppy (.720, 1.2, or 1.44 Megabyte DOS
  21. //      formatted, no errors for BGFT720K.COM ; the above or 360K DOS
  22. //      formatted, no errors for BGFT360K.COM) into the desired floppy
  23. //      drive. The floppy size must correspond to the drive type.
  24. // Compile the BGFTUYTL.SLT by using the Telix compiler, CS, viz.
  25. //      CS BGFTUYTL
  26. //      This will produce BGFTUYTL.SLC for use in Telix.
  27. // From terminal mode do 'Alt_O' for 'Configure Telix'.
  28. // Choose 'Protocol Options'.
  29. // 'Change which setting?': Choose one of the four external protocol
  30. //      options: A, B, C, or D.
  31. // Key: When in the upload operation, pressing this key will choose
  32. //      the protocol. The key should not be used elsewhere, eg. X (Xmodem).
  33. //      Choose 'F', for example. It will be highlighted for the Telix
  34. //      upload operation.
  35. // Protocol name: This is what will show up in the list of protocols when
  36. //      you choose the upload operation. Call it, 'BGFTYmdm'.
  37. // Upload file name: Enter, BGFTUYTL. This will be the compiled script.
  38. // Download file name: For this example, leave it blank.
  39. // BAT or Script: Choose 'Script' since BGFTUYTL.SLT is a script.
  40. // DL name: Choose 'N' for no since the Ymodem Batch protocol provides the
  41. //      correct filenames.
  42. // ESC out of the screen and save the set up to disk by hitting 'W'. This
  43. //      get you back into Telix terminal mode.
  44. // Download as you normally would (PgDn); tell the host to send via Ymodem
  45. //      Batch.
  46. // Choose the BGFTYmdm protocol using arrows plus an ENTER or by the Key
  47. //      defined above.
  48. // When Telix asks the files to upload, answer '*.*'. This will satisfy
  49. //      Telix if it has anything in its upload directory. It will actually
  50. //      be the contents of the file buffer, which are marked for upload,
  51. //      that gets uploaded.
  52. // The script will give some messages, start the background transfer, and
  53. //      exit Telix. You will be at the DOS prompt.
  54. // You should see the BGFT window indicate normal transmission.
  55. // Now you can do your work in foreground as the file is uploaded in
  56. //      background.
  57. // After completion you can use BGFT.EXE to move your files to some DOS
  58. //      directory. The files are ready to use.
  59. // The batch file, BGFTDUMP.BAT, may be used to dump downloaded
  60. //      files from the file buffer to a specified directory (if none is
  61. //      specified, then the current working directory is used).
  62. //
  63.  
  64.  
  65. str command[80];                // Command string for BGFTOPT.
  66. str temp[80];                   // Temporary concatenation string.
  67.  
  68. // The command we will issue to DOS is:
  69. //              BGFTOPT /q /a /r# /b# /~3 /s
  70. //    where:
  71. //      /q    - quiet mode (don't printout results)
  72. //      /a    - acknowledge any error that may be present
  73. //      /r#    - select port # (eg. /r1)
  74. //        /b#   - select baud # (eg. /b2400)
  75. //        /~3   - select protocol 3 (Ymodem Batch upload)
  76. //      /s    - start the transfer
  77.  
  78. main()
  79. {
  80. command = "/q";                         // Start command line.
  81. strcat(command," /a");                  // Acknowledge any error.
  82. strcat(command," /r");
  83. itos(get_port(),temp);                  // Find out where we are connected.
  84. strcat(command,temp);                   // Reconnect existing comm port.
  85. strcat(command," /b");
  86. itos(get_baud(),temp);                  // Find out what is the baud rate.
  87. strcat(command,temp);                   // Set baud rate for resident.
  88. //
  89. //      Ymodem Batch Upload
  90. //
  91. // The files to upload need be in the BGFT file buffer and in
  92. // Telix's default upload directory. Use the 'move files' option in
  93. // BGFT.EXE to put the files to upload on the file buffer. This is
  94. // Ymodem Batch so that all files put on the file buffer for upload
  95. // will be uploaded.
  96. //
  97. strcat(command," /~3");                 // This protocol is Ymodem Batch upload.
  98. strcat(command," /s");                  // Start to send file.
  99. prints(command);                        // Tell user the command string.
  100. run("bgftopt.exe",command,2);
  101. exittelix(0,0);                         // Leave Telix; don't hangup line.
  102. }                                       // Enjoy background Ymodem Batch upld.
  103.  
  104.